/**
 * Created by Administrator on 2016/8/1.
 */
var userService = require('../service/userService');

/**
 * @param req
 * @param res
 */

//个人信息验证
exports.usermessage = function(req, res) {
    var userid=req.query.userid;
    userService.usermessage(userid,function(err, rows) {
        if(err)
        {
            res.send({success:false,msg:"查询失败"});
        }else{
            res.send({success:true,data:rows});
        }
    });
};

//保存个人信息
exports.adduser = function(req, res) {;
    var params = {
        mobile:req.body.mobile,
        username:req.body.username
    }
    userService.adduser(params,function(err, rows) {
        if(err)
        {
            res.send({success:false,msg:"查询失败"});
        }else{
            res.send({success:true,data:rows});
        }
    });
};